.NET Framework Class Library |
ConcurrentBag<(Of <(T>)>)..::.TryTake Method |
ConcurrentBag<(Of <(T>)>) Class See Also Send Feedback |
Attempts to remove and return an object from the ConcurrentBag<(Of <(T>)>).
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Function TryTake ( _ <OutAttribute> ByRef result As T _ ) As Boolean |
C# |
---|
public bool TryTake( out T result ) |
Parameters
- result
- Type:
T
%
When this method returns, result contains the object removed from the ConcurrentBag<(Of <(T>)>) or the default value of T if the operation failed.